package com.example.jsondemo;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView.FindListener;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.TextView;

public class QuestionsAdapter extends ArrayAdapter<Questions>{
    private List<Questions> qList;
     
    public QuestionsAdapter(Context context, List<Questions> qList) {
        super(context, R.layout.question_custom_list, qList);
        this.qList = qList;
    }
     
    @Override
    public int getCount() {
        return qList.size();
    }
     
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View v = convertView;
         
        if(v == null) {
            LayoutInflater li = LayoutInflater.from(getContext());
        }
         
        Questions question = qList.get(position);
         
        if(question != null) {
            TextView QuestionText= (TextView)v.findViewById(R.id.Question);
        }
         
        return v;
    }
}